<h1>New user</h1>

<%= form_for @user, :url => {:action => :create} do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %>
        prohibited this user from being saved:</h2>
      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <fieldset>
  <legend>Enter User Details</legend>

  <div>
    <%= f.label :name %>:
    <%= f.text_field :name, :size => 40 %>
  </div>

  <div>
    <%= f.label :password, 'Password' %>:
    <%= f.password_field :password, :size => 40 %>
  </div>

  <div>
    <%= f.label :password_confirmation, 'Confirm Password' %>:
    <%= f.password_field :password_confirmation, :size => 40 %>
  </div>

  <div>
    <%= f.label :email, 'Email' %>:
    <%= f.text_field :email, :size => 40 %>
  </div>

  <div>
    <%= f.label :description, 'Description' %>:
    <%= f.text_area :description, :size => 40 %>
  </div>

  <div>
    <%= f.submit %>
  </div>

  </fieldset>
<% end %>


<%= link_to 'Back', :action => :login %>
